﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>

<%@ Register Src="~/Ajax/Chatting.ascx" TagName="chat" TagPrefix="ucl" %>
<%@ Import Namespace="Portal.Core" %>
<%@ Register Src="~/Ajax/Chatting.ascx" TagName="chatting" TagPrefix="ucl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type='text/javascript' src="Scripts/jquery-1.4.1.js"></script>
    <script type='text/javascript' src='Scripts/jquery-1.4.1.min.js'></script>
</head>
<body>
    <form id="form1" runat="server">
    <%--        <ucl:chat ID="chat" runat="server" />
    <script type='text/javascript' src='<%=Informations.basepath %>Ajax/ajax.js'></script>
    Name :<input type="text" id="username" onkeyup="GetComment();" />
    <div id="contents_chat">
    </div>--%>
    <script type="text/javascript" language="javascript">
        //        function AddValueSatus(value) {
        //            //            document.getElementById('#').value = 
        //        }
        //        $(document).ready(function () {
        //            var check = 0;
        //            var ismode = 0;
        //            $('#listJob').bind('click', function () {
        //                check++;
        //                ismode = check % 2;
        //                if (ismode == 1) {
        //                    $('#divListJob').css({ 'display': 'block', 'color': '' });
        //                } else {
        //                    $('#divListJob').css({ 'display': 'none', 'color': '' });
        //                }
        //            });
        //            $('#divListJob table tr').bind('mouseover', function () {
        //                //                $(this).css({ 'background-color': 'Red' });
        //            });
        //            //            alert('hello');

        //        })
        //        //         jQuery(function ($) {
        //        //            alert('hello');
        //        ////            GetComment();
        //        //         }
        $(document).ready(function () {
            //            AddValueToHid_Onload();
        });
        function AddValueToHid_Onload() {
            var value_hid = document.getElementById('hid_value').value;
            var SubCatRow;
            var Count;
            if (value_hid == '-1') {
                document.getElementById('check_All').checked = true;
            } else {
                SubCatRow = value_hid.split(',');
                Count = SubCatRow.length;
                for (var i = 0; i < Count; i++) {
                    var rootoject = 'Check_' + SubCatRow[i];
                    document.getElementById(rootoject).checked = true;
                }
            }
        }
        function AddValueToHid_Check(ojects) {
            var value_hid = document.getElementById('hid_value').value;
            var oject_check = document.getElementById(ojects);
            if (oject_check.value != -1) {
                document.getElementById('check_All').checked = false;
                if (oject_check.checked == true) {
                    value_hid = value_hid + ',' + oject_check.value;
                } else {
                    value_hid = value_hid.replace(',' + oject_check.value, '');
                }
            } else {
                for (var i = 0; i < 7; i++) {
                    var ojects_ = 'Check_' + i;
                    document.getElementById(ojects_).checked = false;
                }
                value_hid = '-1';
            }
            document.getElementById('hid_value').value = value_hid;
        }
        function AddValueToHid(ojects, index) {
            var value_hid = document.getElementById('hid_value').value;
            var oject_check = document.getElementById(ojects);
            if (index == 0) { // index=0 la checkbox
                if (oject_check.checked)
                    oject_check.checked = false;
                else
                    oject_check.checked = true;
            }
            if (oject_check.value != -1) {
                document.getElementById('check_All').checked = false;
                if (oject_check.checked == true) {
                    value_hid = value_hid + ',' + oject_check.value;
                } else {
                    value_hid = value_hid.replace(',' + oject_check.value, '');
                }
            } else {
                for (var i = 0; i < 7; i++) {
                    var ojects_ = 'Check_' + i;
                    document.getElementById(ojects_).checked = false;
                }
                value_hid = '-1';
            }
            document.getElementById('hid_value').value = value_hid;
        }
    </script>
    <%--    <div>
        <ucl:chatting ID="chat" runat="server" />
    </div>--%>
    <div style="width: 100%">
        <div style="float: left; width: 35%">
            <table id="table1">
                <tr>
                    <td>
                        <input type="text" style="width:200px" />
                    </td>
                    <td><input type="text" style="width:200px" />
                    </td>
                </tr>
                <tr>
                    <td>
                        
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </div>
        <div style="float: right; width: 65%">
            <div style="float: right; width: 260px">
                <table id="table2">
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox4" value="0" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                             On Scene
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox5" value="0" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            Tow in Progress
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox6" value="1" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            Tow Destination Arrived
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox8" value="0" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            Job Complete
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="float: right; width: 260px">
                <table id="table3">
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox1" value="-1" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            All
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox2" value="0" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            UnAllocated
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox3" value="1" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            Assigned
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" id="Checkbox7" value="1" onchange="AddValueToHid('check_All',1)" />
                        </td>
                        <td>
                            In Route
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style="clear: both">
            </div>
        </div>
        <div style="clear: both">
        </div>
    </div>
    <%--    
    <div>
        <div style="float: left">
        </div>
        <div style='float: right; width: 200px'>
            <div id='listJob' style='width: 200px; height: 17px; line-height: 17px; cursor: pointer;
                border: 1px solid #717171'>
                <div>
                    <div style="float: left; margin-left: 5px">
                    </div>
                    <div style='float: right; margin-top: 0px'>
                        <img src="Images/Icon/Pulldown.png" /></div>
                    <div style="clear: both">
                    </div>
                </div>
            </div>
            <input id="hid_value" type="hidden" value="-1" />
            <div id="divListJob" style="width: 200px; position: absolute; display: block">
                <table>
                    <tr>
                        <td style="width: 22px">
                            
                        </td>
                        <td style="width: 175px" onclick="AddValueToHid('check_All',0)">
                            All
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_0" value="0" onchange="AddValueToHid('Check_0',1)" />
                        </td>
                        <td style="width: 175px" onclick="AddValueToHid('Check_0',0)">
                            UnAllocated
                        </td>
                        <td onclick="AddValueToHid('Check_0')">
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr onclick="AddValueToHid('Check_1')">
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_1" value="1" />
                        </td>
                        <td style="width: 175px">
                            Assigned
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr onclick="AddValueToHid('Check_2')">
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_2" value="2" />
                        </td>
                        <td>
                            In Route
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr onclick="AddValueToHid('Check_3')">
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_3" value="3" />
                        </td>
                        <td>
                            On Scene
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr onclick="AddValueToHid('Check_4')">
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_4" value="4" />
                        </td>
                        <td>
                            Tow in Progress
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr onclick="AddValueToHid('Check_5')">
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_5" value="5" />
                        </td>
                        <td>
                            Tow Destination Arrived
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                    <tr onclick="AddValueToHid('Check_6')">
                        <td style="width: 22px">
                            <input type="checkbox" id="Check_6" value="6" />
                        </td>
                        <td>
                            Job Complete
                        </td>
                        <td>
                            <img src="Images/icon_inroute_selected.png" width="22px" alt="" />
                        </td>
                    </tr>
                </table>
            </div>
            <div style='clear: both'>
            </div>
        </div>
        <div style='clear: both'>
        </div>
    </div>
    <div>
        adsdas ấdadasd<br />
    </div>--%>
    <%--   <div style="text-align: right; padding-left: 400px;background-color:Red">
        <a href=""></a>
        <div id="listJob" style="width: 130px; height: 28px; line-height: 28px; background-color: Gray;
            cursor: pointer">
            <div style="margin: 5px">
                <div style="float: left">
                    Choose List Job</div>
                <div style="float: right; margin-top: 8px">
                    <img src="Images/Icon/down.gif" alt="" /></div>
                <div style="clear: both">
                </div>
            </div>
        </div>
    </div>
    <input type="hidden" id="valueJob" value="0" />
    <ul id="divListJob" style="list-style: none; padding: 5px; width: 250px; background-color: Aqua;display: none;position:relative;border:1px solid #717171">
        <li onclick="javascript:alert(1);" style="background: url('Images/icon_destination_selected.png') center right no-repeat;background-size: 25px; line-height: 25px;">có rì hotddddd </li>
        <li style="background: url('Images/icon_inroute_selected.png') center right no-repeat;background-size: 25px; line-height: 25px;">dấda adsdsd </li>
    </ul>
    <select>
        <option style="background: url('Images/icon_destination_selected.png') center right no-repeat; color: Aqua">hello</option>
        <option style="background: url('Images/icon_inroute_selected.png') center right no-repeat;color: Blue">hello</option>
    </select>--%>
    </form>
</body>
</html>
